<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ include file="head.jsp" %>
<script type="text/javascript">
	$(function() {
		$('#role_list').datagrid({
			url : 'role/list',
			columns : [ [ {
				field : 'rolename',
				title : '角色名称',
				align:'center',
				width:80
			}, {
				field : 'creationtime',
				title : '创建时间',
				align:'center',
				width:150,
				formatter:function(value,row,index){
					return formatDateTime(value);
				}
			}, {
				field : 'isstart',
				title : '是否启用',
				align : 'center',
				width:60,
				formatter:function(value,row,index){
					switch(value){
					case 1:
						return "启用";
						break;
					case 0:
						return "未启用";
						break;
					}
				},
				styler: function(value,row,index){
					if (value == 0){
						return 'background-color:#ffee00;color:red;';
					}
				}

			} ] ],
			
			//设置表格行号
			rownumbers:true,
			fitColumns:true,
			striped:true,
			//单行选中
			singleSelect:true
		});
	})
</script>
</head>
<body>

	<table id="role_list"></table>
</body>
</html>